package mlz.e_lock;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/*
    共享的资源
 */
public class Resource {
    //获取接口实现类对象 -> 锁对象
    public static Lock lock = new ReentrantLock();

    //生产者线程阻塞队列
    public static Condition prod = lock.newCondition();

    //消费者线程阻塞队列
    public static Condition cust = lock.newCondition();

    //判断共享的资源的标记
    public static boolean flag = false;

    //计数
    public static int count = 0;


}
